package Example16;

import java.util.Scanner;

public class Solution {
    public boolean repeatedSubstringPattern(String s) {
        char[] chars = s.toCharArray();
        if(chars.length==1)
            return false;
        boolean isEnable=false;
        StringBuilder subStr=new StringBuilder();
        subStr.append(chars[0]);

        int i=1;
        while (i<chars.length){

            int j=0;
            int k=i;
            for (j = 0; j < subStr.length() && k < chars.length; j++) {
                if (chars[k]!=subStr.charAt(j))
                    break;
                k++;
            }
            if(j!=subStr.length()){
                StringBuilder temp=new StringBuilder();
                while (k>=i){
                    temp.append(chars[k--]);
                }
                subStr.append(temp.reverse());
            }

            i= k==0? i+1: i+k;

        }

        return isEnable;
    }


    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        boolean b = new Solution().repeatedSubstringPattern(scanner.next());
        System.out.println(b);
    }

}
